<template>
    <div class="app-container">

        <div class="container">
            <el-empty v-if="isEmpty(tableData)" description="暂无数据"></el-empty>
            <div class="item" v-else :span="8" v-for="(v, i) in tableData" :key="i">
                <el-card style="margin: 10px;" shadow="hover">
                    <div slot="header">
                        <span>{{ v.deptName }}</span>
                        <!-- <el-button @click="lookVClick(v)" style="float: right; padding: 3px 0" type="text">查看/申请</el-button> -->
                    </div>
                    <div class="card-item">
                        学院代码:{{ v.deptCode }}
                    </div>
                    <div class="card-item">
                        岗位数量:{{ v.postCount }}
                    </div>
                    <div class="card-item">
                        在岗学生数量:{{ v.stuPostCount }}
                    </div>
                    <div class="card-item">
                        本月总工作时长:{{ v.monthTimeCount }}
                    </div>
                    <div class="card-item">
                        本月累计薪资:{{ v.monthTimeCount * 15 }}
                    </div>
                </el-card>
            </div>
        </div>
    </div>
</template>
<script>
import { listCount as getList } from "@/api/workstudy/money";
import { isEmpty, fullLoading } from "@/api/helpFunc";


export default {
    name: "qgzx-count",
    data() {
        return {
            isEmpty,

            tableData: []
        }
    },
    created() {
        this.getList();
    },
    methods: {
        async getList() {
            let loading = fullLoading(this);
            let res = await getList();
            loading.close();
            if (res.code == 200) {
                this.tableData = [...res.data];
            }
        }
    }
}

</script>

<style scoped>
.card-item {
    border-bottom: 1px dotted lightblue;
    font-size: 13px;
}

.container {
    display: grid;
    grid-template-rows: 33.33% 33.33% 33.33%;
    grid-template-columns: repeat(3, 33.33%);
}

.item {}
</style>